<table class="table table-togglable table-hover">
    <thead>
    <tr>
        <!--<th data-toggle="true">编号</th>-->
        <!-- <th data-hide="phone,tablet">描述</th>-->
        <th data-hide="">图片</th>
        <th data-hide="">名称</th>
        <th data-hide="phone,tablet">地址url</th>
        <th data-hide="phone,tablet">上传时间</th>
        <th data-hide="">大小</th>
        <th data-hide="phone">用户</th>
        <th data-hide="">操作</th>
    </tr>
    </thead>
    <tbody>
    <?spa foreach(it.list as key => item): ?>
    <tr>
        <td>
            <a href="http://qqcos-test.tkc8.com/{{= item.path}}?imageView2/0/w/750&image.jpg" class="fancybox-button" data-rel="fancybox-button">
                <img src="http://qqcos-test.tkc8.com/{{= item.path}}?imageView2/1/w/60/h/60">
            </a>
        </td>
        <td>{{= item.name }}</td>
        <td>http://qqcos-test.tkc8.com/{{= item.path }}</td>
        <td>{{= item.create_time}}</td>
        <td>{{= Math.round(item.size/1000)}} KB</td>
        <td>{{= item.member.name}}</td>
        <td>
            <button type="button" class="btn btn-default btn-xs" onclick='deletePhotoStore("{{= item.id }}")'><i class="icon-cross2 position-left"></i>删除</button>
        </td>
    </tr>
    <?spa endForeach; ?>
    </tbody>
</table>

<script>
    var deletePhotoStore = function (id) {
        var param = {
            id: id,
            url: API['photoStore_delete'],
            callback: function () {
                Alpaca.to("#/main/photo/storeListView");
            }
        };
        Alpaca.to("#/main/index/delete/" + id, param);
    };

</script>
